<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String id = request.getParameter("id") == null ? "" : request.getParameter("id").toString().trim();
	String pid = request.getParameter("pid") == null ? "" : request.getParameter("pid").toString().trim();
%>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0" />
	<title>菜单管理</title>
	<link rel="stylesheet" href="<%=path %>/skin/default/css/editor.css" type="text/css" />
	<link rel="stylesheet" href="<%=path %>/skin/default/css/button.css" type="text/css" />
	<link rel="stylesheet" href="<%=path %>/scripts/dialog/default/ymPrompt.css" type="text/css" />
	
	<script type="text/javascript" src="<%=path %>/scripts/jquery/jquery-1.8.2.js"></script>
	<script type="text/javascript" src="<%=path %>/scripts/jquery/jquery.json-2.2.min.js"></script>
	<script type="text/javascript" src="<%=path %>/scripts/jquery/jquery.placeholder.js"></script>
	<script type="text/javascript" src="<%=path %>/scripts/dialog/ymPrompt.js"></script>
	<script type="text/javascript" src="<%=path %>/scripts/validator.js"></script>
	<script type="text/javascript" src="<%=path %>/scripts/main.js"></script>
	<script type="text/javascript" src="<%=path %>/scripts/utils.js"></script>
	<script type="text/javascript">
		$(function(){
			var id = '<%=id %>';
			var pid = '<%=pid %>';
			var options = {
				detailUrl:"Data",
				submitUrl:"SaveOrUpdate",
				returnUrl:"<%=path %>/menu/view?pid="+pid,
				submitBtn:"btnSaveOrModify",
				closeBtn:"btnClose",
				openState:true,
				formId:id
			};
			$("#form").loadEditData(options);
		});
	</script>
</head>
<body>
	<div id="container">
		<div class="bottomBar">
			<div class="fr" style="margin-right: 10px;">
				<input type="button" id="btnSaveOrModify" name="btnSaveOrModify" class="btn btn82 btn_save_bottom" value="保 存" />
				<input type="button" id="btnClose" name="btnClose" class="btn btn82 btn_close" value="关 闭" /> 
			</div>
		</div>
		<input type="hidden" id="basePath" name="basePath" value="<%=path %>" />
		<form action="" id="form" method="post">
			<input type="hidden" id="id" name="id" value="<%=id %>" />
			<input type="hidden" id="parentId" name="parentId" value="<%=pid %>" >
			<table border="0" cellpadding="0" cellspacing="0" class="form_table">
				<tr>
					<td class="td_right">菜单名称：</td>
					<td><input type="text" id="menuName" name="menuName" value="" class="input_long" require="NotNull"/></td>
				</tr>
				<tr>
					<td class="td_right">菜单标识：</td>
					<td><input type="text" id="menuKey" name="menuKey" value="" class="input_long" require="NotNull"/></td>
				</tr>
				<tr>
					<td class="td_right">菜单地址：</td>
					<td><input type="text" id="menuUrl" name="menuUrl" value="" class="input_long"/></td>
				</tr>
				<tr>
					<td class="td_right">菜单顺序：</td>
					<td><input type="text" id="sortNumber" name="sortNumber" value="" class="input_long" require="Number"/></td>
				</tr>
				<tr>
					<td class="td_right">菜单状态：</td>
					<td>
						<input type="radio" id="state1" name="status" value="Y" checked="checked"/>&nbsp;启用
						&nbsp;&nbsp;
						<input type="radio" id="state2" name="status" value="N"/>&nbsp;禁用
					</td>
				</tr>
				<tr>
					<td class="td_right">描述：</td>
					<td>
						<textarea id="description" name="description" class="textarea"></textarea>
					</td>
				</tr>				
			</table>
		</form>
	</div>
</body>
</html>